package kuonjisai.swing.outline;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JCheckBox;
import javax.swing.JRadioButton;
import javax.swing.JEditorPane;

public class J03_HellowSwingComponent extends JFrame {

	private JPanel contentPane;
	private JTextField txtIGotC;
	private JCheckBox chckbxAreYouHomo;
	private JButton btnImBaldhead;
	private JEditorPane editorPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					J03_HellowSwingComponent frame = new J03_HellowSwingComponent();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public J03_HellowSwingComponent() {
		setTitle("This is Hello~? : ) ");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		
		JLabel lblHelloSwing = new JLabel("Hello, Swing!! Your Lucky guy");
		lblHelloSwing.setFont(new Font("Iskoola Pota", Font.PLAIN, 13));
		lblHelloSwing.setHorizontalAlignment(SwingConstants.CENTER);
		contentPane.add(lblHelloSwing, BorderLayout.NORTH);
		
		txtIGotC = new JTextField();
		txtIGotC.setText("I got C!! Baby Baby!");
		contentPane.add(txtIGotC, BorderLayout.WEST);
		txtIGotC.setColumns(10);
		
		chckbxAreYouHomo = new JCheckBox("Are you Homo?");
		contentPane.add(chckbxAreYouHomo, BorderLayout.EAST);
		
		btnImBaldhead = new JButton("I'm baldHead");
		contentPane.add(btnImBaldhead, BorderLayout.SOUTH);
		
		editorPane = new JEditorPane();
		contentPane.add(editorPane, BorderLayout.CENTER);

	}

}
